﻿<local:DocumentBase x:Class="WPFExcelReport.YGRGS08"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls" 
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"                     
                    FontSize="16"
                    Loaded="Window_Loaded" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="105">
    <local:DocumentBase.Resources>
        <ucd:PNumConverter  x:Key="pnum"/>
    </local:DocumentBase.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="2*"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" Grid.ColumnSpan="2">
            <WrapPanel >
                <Label Content="色号："    Width="61" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtCOLOR" Width="110" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="WhiteSmoke" Panel.ZIndex="1"
                         Text="" KeyUp="txtART_KeyUp" CharacterCasing="Upper"
                         MaxLength="10" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="适用纱支段："    Width="106" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtCOUNT" Width="234" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="2"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="8" FontSize="18" Foreground="#FF141111" Height="33" />
                <Button Content="查询" Height="33" Margin="10,0,0,0"  Name="btnQuery" Width="96" Panel.ZIndex="6"
                        Click="btnQuery_Click"/>
                <Button Content="导出" Height="33" Margin="10,0,0,0"  Name="btnEXCEL" Width="100" Panel.ZIndex="7"
                        Click="btnEXCEL_Click"/>
            </WrapPanel>
        </StackPanel>
        <DataGrid Grid.Row="1" Margin="0,1,0,0"    
                  FontSize="12"
                              CanUserReorderColumns="True"  
                              CanUserResizeRows="True" CanUserSortColumns="True"                  
                              AutoGenerateColumns="False"   
                              EnableRowVirtualization="True"  SelectionChanged="MasterDg_SelectionChanged"
                              RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                              IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                              ItemsSource="{Binding}" x:Name="MasterDg" >
            <DataGrid.Columns>
                <!--GSCART C.GSHANDLNR,	GSCFARBE	GSCBEZ	GSCMUFRB	BEZ -->
                <DataGridTextColumn Header="粗纱编号" Binding="{Binding GSCART}" Width="Auto"/>
                <DataGridTextColumn Header="粗纱描述" Binding="{Binding GSHANDLNR}" Width="Auto"/>
                <DataGridTextColumn Header="色号" Binding="{Binding GSCFARBE}" Width="Auto"/>
                <DataGridTextColumn Header="色号描述" Binding="{Binding GSCBEZ}" Width="Auto"/>
                <DataGridTextColumn Header="适用纱支" Binding="{Binding GSCMUFRB}" Width="Auto"/>
                <DataGridTextColumn Header="备注" Binding="{Binding BEZ}" Width="Auto"/>
            </DataGrid.Columns>
        </DataGrid  >
        <DataGrid Grid.Row="2" Margin="0,1,0,0" 
                              FontSize="12"
                              CanUserReorderColumns="True"  
                              CanUserResizeRows="True" CanUserSortColumns="True"                  
                              AutoGenerateColumns="False"   
                              EnableRowVirtualization="True"  
                              RowDetailsVisibilityMode="VisibleWhenSelected" 
                              HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                              IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                              ItemsSource="{Binding}" x:Name="dlDg"  
                              >
            <DataGrid.Columns>
                <DataGridTextColumn Header="序号" Binding="{Binding GAGPOS}" Width="Auto"/>
                <DataGridTextColumn Header="类型" Binding="{Binding POS}" Width="Auto"/>
                <DataGridTextColumn Header="原料类别" Binding="{Binding TYPE}" Width="Auto"/>
                <DataGridTextColumn Header="原料编号" Binding="{Binding GAGGART}" Width="Auto"/>
                <DataGridTextColumn Header="原料色号" Binding="{Binding GAGGFARBE}" Width="Auto"/>
                <DataGridTextColumn Header="原料颜色" Binding="{Binding COLOR}" Width="Auto"/>
                <DataGridTextColumn Header="百分比" Binding="{Binding RATE}" Width="Auto"/>
                <DataGridTextColumn Header="损耗系数" Binding="{Binding COMSUM}" Width="Auto"/>
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</local:DocumentBase>
